package cn.itcast.nems.studentrecord.enumeration;

import cn.itcast.ic.common.exception.v2.bean.BizErrorBody;
import cn.itcast.ic.common.exception.v2.bean.BizStatusEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
 * <p>
 * 学籍异常提示模版
 * </p>
 *
 * @author zhouwei
 * @since 2023/11/12 3:24 PM
 **/
@Getter
@AllArgsConstructor
public enum StudentRecordErrorBodyEnum implements BizErrorBody {

    PARAMS_ERROR(BizStatusEnum.BAD_REQUEST, "请求失败：用户请求参数错误！"),
    REQUEST_PARAM_SCHOOL_NO_EXIST(BizStatusEnum.BAD_REQUEST,"校区[%s]数据不存在，请检查是否正确！"),
    REQUEST_PARAM_SUBJECT_NO_EXIST(BizStatusEnum.BAD_REQUEST,"学科ID[%s]数据不存在，请检查是否正确！"),
    REQUEST_PARAM_CLAZZ_NO_EXIST(BizStatusEnum.BAD_REQUEST,"班级ID[%s]数据不存在，请检查是否正确！"),
    REQUEST_PARAM_TUITION_NO_EXIST(BizStatusEnum.BAD_REQUEST,"班级[ID:%s]尚未定价，无法办理凭单。请联系财务老师配置价格后再办理！"),
    STUDENT_RECORD_LOCKED(BizStatusEnum.BAD_REQUEST, "%s 该学籍尚有在途凭单，请在其它凭单审批完成后再办理！"),
    STUDENT_RECORD_RENEWAL(BizStatusEnum.BAD_REQUEST, "%s 该学籍已升班！"),
    ENROLLMENT_COUNT_UPDATE_ERROR(BizStatusEnum.INTERNAL_SERVER_ERROR, "orderId: %s, clazzId: %s, orderTypeEnum: %s, 缴费情况数量更新失败！"),
    ENROLLMENT_COUNT_EXECUTE_ERROR(BizStatusEnum.BAD_REQUEST, "操作失败：存在正在执行中的“缴费情况同步”任务，10分钟后请重试"),
    IN_AFTER_OUT_DATE_ERROR(BizStatusEnum.BAD_REQUEST,"进班时间：%s 早于基础班出班时间：%s！" ) ,
    SETTLEMENT_DATE_NOT_EMPTY(BizStatusEnum.BAD_REQUEST,"出班结算时间：%s 不为空！" ) ,
    SETTLEMENT_OUT_TYPE_ERROR(BizStatusEnum.BAD_REQUEST,"班级预计结课时间：%s 出班日期：%s 出班情况选择错误！" ) ,

    // REQUEST_JOURNAL_RENEWAL_STATE_ERROR(BizStatusEnum.BAD_REQUEST, "ID: %s, STATE: %s, 仅允许保存或提交草稿状态的凭单！"),
    REQUEST_JOURNAL_RENEWAL_STATE_ERROR(BizStatusEnum.BAD_REQUEST, "当前凭单已提交过审批，请勿重复操作！您可刷新页面后再查看。"),
    REQUEST_JOURNAL_RENEWAL_REPEAT(BizStatusEnum.BAD_REQUEST,"重复添加！"),
    NOT_EXISTS(BizStatusEnum.BAD_REQUEST, "学籍不存在"),
    LIMIT_PART_PAYMENT_AMOUNT(BizStatusEnum.BAD_REQUEST, "支付金额%s"),
    LIMIT_PART_PAYMENT_COUNT(BizStatusEnum.BAD_REQUEST, "剩余缴费次数不足"),
    PAYMENT_RECORD_NOT_EXISTS(BizStatusEnum.BAD_REQUEST, "学员缴费记录不存在"),

    WORKFLOW_CANCEL_NO_CREATED_BY(BizStatusEnum.BAD_REQUEST, "只有发起人才能撤回！") ,
    WORKFLOW_CANCEL_NO_PENDING(BizStatusEnum.BAD_REQUEST, "只有待审批状态才能撤回！") ,
    WORKFLOW_NO_DRAFT_DELETE(BizStatusEnum.BAD_REQUEST, "只有草稿状态才能删除！") ,
    WORKFLOW_NO_PENDING_APPROVING(BizStatusEnum.BAD_REQUEST, "只有待审核或审核中状态的凭单才能审核！") ,
    APPROVE_CAN_NOT_EDIT(BizStatusEnum.BAD_REQUEST, "凭单当前状态无法编辑"),
    BAD_REQUEST(BizStatusEnum.BAD_REQUEST, "%s"),
    PERSONAL_DISCOUNT_USED(BizStatusEnum.BAD_REQUEST, "个人优惠ID：%s单已使用"),

    JOURNAL_FINAL_LINE_COUNT_DIFFERENT(BizStatusEnum.BAD_REQUEST, "该班级存在在途学籍 原凭单在籍学员数量：%s 当前在籍学员数量：%s"),
    JOURNAL_FINAL_LINE_OUT_CLAZZ(BizStatusEnum.BAD_REQUEST, "该班级存在缺少新的在途学籍：%s "),

    TRANSFER_REFERENCE_TYPE_INCORRECT(BizStatusEnum.INTERNAL_SERVER_ERROR, "转班凭单类型[%s]不正确。正确的凭单类型只允许包括：转班、转移、休学、待定！"),
    SETTLEMENT_ARGUMENT_INCORRECT(BizStatusEnum.INTERNAL_SERVER_ERROR, "计算出班结算数据时，参数不正确。参数名称：%s"),


    SETTLEMENT_REPEAT_CLAZZ_ERROR(BizStatusEnum.BAD_REQUEST, "提交重读凭单失败！无法为已【%s】的学籍办理重读，请重新选择学籍办理。"),
    STUDENT_RECORD_STATE_NO_VALID(BizStatusEnum.BAD_REQUEST, "该学籍【%s】未生效！"),

    STUDENT_RECORD_LOCK_DATA_NOT_ONE(BizStatusEnum.BAD_REQUEST, "学籍【%s】锁记录存在多条！"),
    JOURNAL_NOT_ALLOW_COMMIT(BizStatusEnum.BAD_REQUEST, "进班日期与学员学籍日期冲突，详见学员列表，请核对后再次提交"),
    JOURNAL_IN_DATE_AFTER_PREDICTION_GRADUATION_DATE(BizStatusEnum.BAD_REQUEST, "进班日期不能晚于预计结课时间"),
    STUDENT_AGE_FORMAT_ERROR(BizStatusEnum.BAD_REQUEST, "年龄解析失败"),
    
    STUDENT_RECORD_DATA_EXCEPTION_STUDENT_ID(BizStatusEnum.INTERNAL_SERVER_ERROR, "数据异常，基于学籍获取学生信息失败！"),
    REFUNDABLE_AMOUNT_DATA_EXCEPTION(BizStatusEnum.INTERNAL_SERVER_ERROR, "获取学生可退费最大金额数据异常！"),
    
    /**
     * 退学凭单相关的异常
     */
    DROPOUT_STUDENT_RECORD_ALREADY_SETTLEMENT(BizStatusEnum.BAD_REQUEST, "该学籍已经出班，无法再办理退学！"),
    DROPOUT_STUDENT_RECORD_NOT_EXISTS(BizStatusEnum.BAD_REQUEST, "退学学籍不存在，请重新确认或刷新后重试！"),
    DROPOUT_STUDENT_RECORD_INVALID(BizStatusEnum.BAD_REQUEST, "退学学籍尚未生效或已失效，请确认学生此学籍已支付！"),
    DROPOUT_SAVE_FAILED(BizStatusEnum.INTERNAL_SERVER_ERROR, "退学凭单数据保存异常！"),
    DROPOUT_OUT_OF_REFUNDABLE_AMOUNT(BizStatusEnum.BAD_REQUEST, "提交退学凭单失败！当前学生最大可退费金额为%s元，本次退费金额不能超过此金额！"),
    REFUND_AMOUNT_OUT_PAID(BizStatusEnum.BAD_REQUEST, "该学员可退费金额%s元，不能进行%s元的退费操作！"),
    REQUEST_ECA_QUERY_CONTRACT_URL_ERROR(BizStatusEnum.INTERNAL_SERVER_ERROR, "调用ECA获取合同链接接口失败！"),
    CONTRACT_NOT_FUND(BizStatusEnum.BAD_REQUEST, "暂无合同信息"),

    
    ;

    public final BizStatusEnum status;
    public final String message;
}
